<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<jsp:useBean id="goodsDao" class="njust.dao.impl.GoodsDaoImpl"
	scope="page" />
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Trading</title>

<link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="./bootstrap/css/bootstrap-theme.min.css">
<script src="./jquery.js"></script>
<script src="./bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./css/style.css">
<script src="./js/app.js"></script>
<script src="./js/releaseNeed.js"></script>



</head>

<body>
    <jsp:include page="./front/head.jsp"></jsp:include>
	<!-- 发布需求模态框 -->
	<!-- Modal -->
	<div class="modal fade" id="releaseNeed" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">发布需求</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal">
						<div class="form-group">

							<label for="" class="col-sm-2 control-label">需求</label>
							<div class="col-sm-9">
								<input name="need.title" class="form-control" id="Needtitle"
									placeholder="请输入您的需求" required>
							</div>
						</div>
						<div class="form-group">
							<label for="" class="col-sm-2 control-label">描述</label>
							<div class="col-sm-9">
								<textarea name="need.description" id="NeedDes"
									class="form-control" rows="5"></textarea>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" id="closeSelf" class="btn btn-default"
						data-dismiss="modal">关闭</button>
					<button type="button" id="releaseNeeds" class="btn btn-primary">立即发布</button>
				</div>
			</div>
		</div>
	</div>

	<div class="modal fade" id="needsResult" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">发布需求</h4>
				</div>
				<div id="needsResultBody" class="modal-body"></div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 发布需求end -->

	<div class="content_container">
		<ul id="goods_menu">
			<li><b style=""></b> <a href="#">电子数码</a></li>
			<li><b></b> <a href="#">家居日用</a></li>
			<li><b></b> <a href="#">鞋服配饰</a></li>
			<li><b></b> <a href="#">美食珍馐</a></li>
			<li><b></b> <a href="#">珠宝收藏</a></li>
		</ul>
		<div class="goods_menu_detail">
			<a href="#">手机</a> <a href="#">相机/摄像机</a> <a href="#">电脑/电脑周边</a> <a
				href="#">电玩随身听</a>
		</div>
		<div class="goods_menu_detail">
			<a href="#">手机</a> <a href="#">相机/摄像机</a> <a href="#">电脑/电脑周边</a> <a
				href="#">电玩随身听</a>
		</div>
		<div class="goods_menu_detail">
			<a href="#">手机</a> <a href="#">相机/摄像机</a> <a href="#">电脑/电脑周边</a> <a
				href="#">电玩随身听</a>
		</div>
		<div class="goods_menu_detail">
			<a href="#">手机</a> <a href="#">相机/摄像机</a> <a href="#">电脑/电脑周边</a> <a
				href="#">电玩随身听</a>
		</div>
		<div class="goods_menu_detail">
			<a href="#">手机</a> <a href="#">相机/摄像机</a> <a href="#">电脑/电脑周边</a> <a
				href="#">电玩随身听</a>
		</div>



		<div id="carousel-example-generic" class="carousel slide"
			data-ride="carousel"
			style="float:left;display:inline-block;margin:20px 0;">
			<!-- Indicators -->
			<ol class="carousel-indicators">
				<li data-target="#carousel-example-generic" data-slide-to="0"
					class="active"></li>
				<li data-target="#carousel-example-generic" data-slide-to="1"></li>
				<li data-target="#carousel-example-generic" data-slide-to="2"></li>
				<li data-target="#carousel-example-generic" data-slide-to="3"></li>
				<li data-target="#carousel-example-generic" data-slide-to="4"></li>
			</ol>

			<!-- Wrapper for slides -->
			<div class="carousel-inner" role="listbox">
				<div class="item active">
					<img src="./img/01.jpg" alt="...">
					<div class="carousel-caption"></div>
				</div>
				<div class="item">
					<img src="./img/02.jpg" alt="...">
					<div class="carousel-caption"></div>
				</div>
				<div class="item">
					<img src="./img/03.jpg" alt="...">
					<div class="carousel-caption"></div>
				</div>
				<div class="item">
					<img src="./img/04.jpg" alt="...">
					<div class="carousel-caption"></div>
				</div>
				<div class="item">
					<img src="./img/05.jpg" alt="...">
					<div class="carousel-caption"></div>
				</div>

			</div>

			<!-- Controls -->
			<a class="left carousel-control" href="#carousel-example-generic"
				role="button" data-slide="prev"> <span
				class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
				<span class="sr-only">Previous</span>
			</a> <a class="right carousel-control" href="#carousel-example-generic"
				role="button" data-slide="next"> <span
				class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
				<span class="sr-only">Next</span>
			</a>
		</div>


		<div id="right_menu">
			<div class="left_box">
				<a href="releaseGoods.jsp">发布闲置</a>
			</div>
			<div class="right_box">
				<a data-toggle="modal" data-target="#releaseNeed" href="#">发布需求</a>
			</div>
			<div class="bottom_box">
				<img src="./img/ma.jpg" alt="">
				<p style="margin-top:30px;font-size:18px;">
					轻扫二维码, <br>加入我们的大家庭!
				</p>
			</div>
		</div>


		<div id="goods_container">
			<div>
				<h3>数码控.3C也性感</h3>
				<hr>
				<div class="goods_list">

					<c:forEach items="${goodsList }" var="goods" begin="0" end="9" step="1">


						<div class="goods_item">
							<a href="goods!getGoodById.action?id=${goods.id}"><img
								src="${goods.url }" alt=""></a>
							<p class="title">
								<a href="#">${goods.goodname }</a>
							</p>
							<span class="chengse"> 
								<c:choose>
									<c:when test="${goods.agingdegree==10 }">全新</c:when>
									<c:when test="${goods.agingdegree==9 }">九成新</c:when>
									<c:when test="${goods.agingdegree==8 }">八成新</c:when>
									<c:when test="${goods.agingdegree==7 }">七成新</c:when>
									<c:when test="${goods.agingdegree==6 }">六成新</c:when>
									<c:when test="${goods.agingdegree==5 }">五成新</c:when>
									<c:when test="${goods.agingdegree==4 }">四城新</c:when>
									<c:when test="${goods.agingdegree==3 }">三成新</c:when>
									<c:when test="${goods.agingdegree==2 }">两层新</c:when>
									<c:when test="${goods.agingdegree==1 }">一层新</c:when>

								</c:choose>


							</span> <span class="price">￥${goods.price }</span>
						</div>


					</c:forEach>






				</div>
			</div>

			<div style="display:none">
				<h3>运动男女.深呼吸</h3>
				<hr>
				<div class="goods_list">
				
				
					
					<div class="goods_item" style="display:none">
						<a href="#"><img src="../img/goods1.jpg" alt=""></a>
						<p class="title">
							<a href="#">2015款正品国行全新未拆封</a>
						</p>
						<span class="chengse">全新</span> <span class="price">￥3998</span>
					</div>
				</div>
			</div>
			


		</div>
	</div>


</body>

</html>



